(ispell-grep-command): Use "grep" on MS-Windows and MS-DOS.
authorEli Zaretskii <eliz@gnu.org>
Sat, 29 Dec 2007 12:38:19 +0000 (12:38 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 29 Dec 2007 12:38:19 +0000 (12:38 +0000)
(ispell-grep-options): Use "-Ei" on MS-Windows and MS-DOS.

lisp/textmodes/ispell.el

index 3d6a17c5d9334918114efa0577098af8bf5b9d57..c784960f9724ebb60cb955e6c34235525ef14ce9 100644 (file)
@@ -349,12 +349,17 @@ Always stores Fcc copy of message when nil."
   :group 'ispell)
 
 
-(defcustom ispell-grep-command "egrep"
+(defcustom ispell-grep-command
+  ;; MS-Windows/MS-DOS have `egrep' as a Unix shell script, so they
+  ;; cannot invoke it.  Use "grep -E" instead (see ispell-grep-options
+  ;; below).
+  (if (memq system-type '(windows-nt ms-dos)) "grep" "egrep")
   "Name of the grep command for search processes."
   :type 'string
   :group 'ispell)
 
-(defcustom ispell-grep-options "-i"
+(defcustom ispell-grep-options
+  (if (memq system-type '(windows-nt ms-dos)) "-Ei" "-i")
   "String of options to use when running the program in `ispell-grep-command'.
 Should probably be \"-i\" or \"-e\".
 Some machines (like the NeXT) don't support \"-i\""